/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.admin.service.impl;

import org.springblade.core.tenant.annotation.TenantIgnore;
import org.springblade.modules.admin.dto.feishu.LarkContractContinueDTO;
import org.springblade.modules.admin.entity.ElevatorContract;
import org.springblade.modules.admin.vo.ElevatorContractVO;
import org.springblade.modules.admin.mapper.ElevatorContractMapper;
import org.springblade.modules.admin.service.IElevatorContractService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.modules.admin.vo.feishu.LarkContractContinueTimelinessVO;
import org.springblade.modules.admin.vo.feishu.LarkContractLoseRateTrendVO;
import org.springblade.modules.admin.vo.feishu.MaintainElevatorContractVO;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.Collections;
import java.util.List;

/**
 * 电梯合同信息 服务实现类
 *
 * @author ysq
 * @since 2022-03-01
 */
@Service
public class ElevatorContractServiceImpl extends BaseServiceImpl<ElevatorContractMapper, ElevatorContract> implements IElevatorContractService {

	@Override
	public IPage<ElevatorContractVO> selectElevatorContractPage(IPage<ElevatorContractVO> page, ElevatorContractVO elevatorContract) {
		return page.setRecords(baseMapper.selectElevatorContractPage(page, elevatorContract));
	}

	@Override
	public List<ElevatorContract> getList(Long elevatorId) {

		return baseMapper.getList(elevatorId);
	}

	@Override
	@TenantIgnore
	public List<MaintainElevatorContractVO> getLarkMaintainElevatorContractList() {
		return baseMapper.getLarkMaintainElevatorContractList();
	}

	@Override
	@TenantIgnore
	public List<LarkContractContinueDTO> getLarkContractContinueList() {
		return baseMapper.getLarkContractContinueList();
	}

	@Override
	@TenantIgnore
	public List<LarkContractLoseRateTrendVO> getLarkContractLoseRateTrendList() {
		return baseMapper.getLarkContractLoseRateTrendList();
	}

	@Override
	@TenantIgnore
	public List<LarkContractContinueTimelinessVO> getLarkContractContinueTimelinessList() {
		return baseMapper.getLarkContractContinueTimelinessList();
	}

	@Override
	public ElevatorContract getLastOfelevatorId(Long elevatorId, Long contractId) {
		return baseMapper.getLastOfelevatorId(elevatorId,contractId);
	}

	@Override
	public List<ElevatorContract> getListAll(Long elevatorId) {
		return baseMapper.getListAll(elevatorId);
	}

}
